package com.itheima.java.ai.langchin4j.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("appointments")
public class Appointment {
    @TableId(type = IdType.AUTO)
    private Long id;
    
    // 新字段
    private Long userId;
    private Long doctorId;
    private Long scheduleId;
    private LocalDate appointmentDate;
    private String timeSlot;
    private String symptoms;
    private Status status;
    private LocalDateTime createdAt;
    
    // 保留原有字段以兼容现有代码
    private String username;
    private String idCard;
    private String department;
    private String date;
    private String time;
    private String doctorName;
    
    public enum Status {
        PENDING, CONFIRMED, COMPLETED, CANCELLED
    }

    // 手动添加getter方法
    public Long getId() {
        return id;
    }

    public Long getUserId() {
        return userId;
    }

    public Long getDoctorId() {
        return doctorId;
    }

    public Long getScheduleId() {
        return scheduleId;
    }

    public LocalDate getAppointmentDate() {
        return appointmentDate;
    }

    public String getTimeSlot() {
        return timeSlot;
    }

    public String getSymptoms() {
        return symptoms;
    }

    public Status getStatus() {
        return status;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public String getUsername() {
        return username;
    }

    public String getIdCard() {
        return idCard;
    }

    public String getDepartment() {
        return department;
    }

    public String getDate() {
        return date;
    }

    public String getTime() {
        return time;
    }

    public String getDoctorName() {
        return doctorName;
    }

    // 手动添加setter方法
    public void setId(Long id) {
        this.id = id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    public void setScheduleId(Long scheduleId) {
        this.scheduleId = scheduleId;
    }

    public void setAppointmentDate(LocalDate appointmentDate) {
        this.appointmentDate = appointmentDate;
    }

    public void setTimeSlot(String timeSlot) {
        this.timeSlot = timeSlot;
    }

    public void setSymptoms(String symptoms) {
        this.symptoms = symptoms;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
}
